<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>后台管理系统</title>
    <link rel="stylesheet" href="__WEBPUBLIC__/Admin/css/reset.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="__WEBPUBLIC__/Admin/css/style.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="__WEBPUBLIC__/Admin/css/invalid.css" type="text/css" media="screen" />
    <!--<link rel="stylesheet" href="__WEBPUBLIC__/Admin/css/expand.css" type="text/css" media="screen" />-->
    <script type="text/javascript" src="__WEBPUBLIC__/Admin/js/jquery-1.9.1.min.js"></script>

</head>
<body>
<!--主页面-->
<div id="main-content">
    <div class="content-box">
        <!--头部切换-->
        <div class="content-box-header">
            <h3>会员列表</h3>
            <div class="clear"></div>
        </div>

        <div class="content-search" style="height: 40px;margin: 10px 0 0 10px;">
            <form action="{:U('User/userlist')}" method="post">
                姓名：<input type="text" name="name" class="text-input" value="{$_REQUEST['name']}">
                在此之前：<input type="date" name="ctime" class="text-input" value="{$_REQUEST['ctime']}">
                <input type="submit" class="button search-btn" value="查询">
                <a class="button search-btn" href="{:U('User/expUser')}">导出</a>

            </form>
        </div>

        <!--表格内容-->
        <div class="content-box-content">
            <!--内容表格 start-->
            <div class="tab-content default-tab" id="tab1">
                <table border="1">
                    <!--标题 start-->
                    <thead>
                    <tr>
                        <th width="5%">ID</th>
                        <th width="5%">姓名</th>
                        <th width="5%">身份证</th>
                        <th width="5%">电话</th>
                        <th width="10%">行业</th>
                        <th width="10%">职务</th>
                        <th width="10%">创建时间</th>
                        <th width="10%">审核</th>
                        <th width="10%">操作</th>
                    </tr>
                    </thead>
                    <!--标题 end-->
                    <!--内容 start-->
                    <tbody>
                    <volist name="userlist" id="user">
                        <tr>
                            <td>{$user.id}</td>
                            <td>{$user.name}</td>
                            <td>{$user.cardid}</td>
                            <td>
                                {$user.tel}
                            </td>
                            <td>
                                {$user.hy}
                            </td>
                            <td>
                                {$user.zhiw}
                            </td>
                            <td>
                                {$user.ctime|date="Y-m-d H:m:i",###}
                            </td>
                            <td>
                                <if condition="$user['status'] eq 0">
                                    未审核
                                    <else/>
                                    已审核
                                </if>
                            </td>
                            <td>
                                <!--<a href="{:U('WeiXinArticle/editTextBack',array('wxa_id'=>$text_back['wxa_id']))}" title="审核">
                                    <img src="__WEBPUBLIC__/Admin/images/icons/pencil.png" width="16" height="18" alt="审核" />
                                </a>-->
                                <if condition="$user['status'] eq 0">

                                <a href="###" class="del" title="审核" uid="{$user.id}">
                                    <img src="__WEBPUBLIC__/Admin/images/icons/pencil.png" alt="审核" />
                                </a>
                                </if>
                            </td>
                        </tr>
                    </volist>
                    </tbody>
                    <!--内容 end-->
                    <!--表尾 start-->
                    <tfoot>
                    <tr>
                        <td colspan="20">
                            <div class="bulk-actions align-left">
                            </div>
                            <div class="pagination">
                                {$page}
                            </div>
                            <div class="clear"></div>
                        </td>
                    </tr>
                    </tfoot>
                    <!--表尾 end-->
                </table>
            </div>
            <!--内容表格 end-->
        </div>
    </div>
</div>
</body>
<script type="text/javascript" src="__WEBPUBLIC__/Admin/js/layer/layer.js"></script>
<script type="text/javascript">
    $(document).ready(function(){
        //删除类型
        $('.del').click(function(){
            var uid = $(this).attr('uid');
            $.ajax({
                url: "{:U('User/updstatus')}",
                dataType: "json",
                data: {id:uid},
                type: "post",
                success: function ( res ) {
                    layer.msg( res.message );
                    if ( res.flag == "success" ) {
                        setTimeout(function () {
                            window.location.reload();
                        },500);
                    }
                } 
            });
        });
    });
</script>
</html>
